﻿using System;

class Text
{
    public static void Main(String[] args)
    {
        int [] arr = new int[100];
        for(int i = 0; i < 100; i++)
        {
            Random r = new Random();
            arr[i] = r.Next(0,1000);
        }
        var m = from n in arr where n > 0 orderby n descending select n;
        int sum = 0;
        foreach(var n in m)
        {
            Console.Write(n+" ");
            sum+=n;

        }

        double average = sum/arr.Length;
        Console .WriteLine("和："+sum);
        Console.WriteLine("均值：" + average);
        
    }
}
